﻿using System;
using System.Diagnostics;
using System.Threading;
using ShellCommandClientService.ShellCommandServiceReference;

namespace ShellCommandClientService
{
    public class Program
    {
        public static void Main(string[] args)
        {
            ShellCommandClient shellClient=new ShellCommandClient();
            String machineName = Environment.MachineName;
            //shellClient.Execute(new ShellCommandInfo() {MachineName = machineName, Text = "dir", IpAddress = string.Empty});
            //Thread.Sleep(5000);
            IShellCommandExecuter commandExecuter = new ShellCommandExecuter();
            MyCallBack callBack = new MyCallBack(commandExecuter);
            while (true)
            {
                callBack.callService();
                //callBack.Dispose();
                Thread.Sleep(4000);
            }
            Console.Read();
            
        }
    }
}
